package com.kl.forum.service;

import com.kl.forum.dao.ArticleCommentLightMapper;
import com.kl.forum.entity.ArticleCommentLight;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class ArticleCommentLightService {

    @Autowired
    private ArticleCommentLightMapper articleCommentLightMapper;

    public ArticleCommentLight findArticleCommentLightRecord(Integer articleCommentId, Integer userId){
        Map map=new HashMap();
        map.put("articleCommentId",articleCommentId);
        map.put("userId",userId);
        return articleCommentLightMapper.findArticleCommentLightRecord(map);
    }
    public int insert(ArticleCommentLight articleCommentLight){
        return articleCommentLightMapper.insertSelective(articleCommentLight);
    }
    public  int update(ArticleCommentLight articleCommentLight ){
        return articleCommentLightMapper.updateByPrimaryKeySelective(articleCommentLight);
    }
}
